import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    booksList:null,
    id:null,
    zId:null,
    history:[],
    searchHistory:[]
  },
  mutations: {
    bookList(state,value){
      state.booksList=value
    },
    bookId(state,value){
      state.id=value
    },
    zId(state,value){
      state.zId=value
    },
    setHistory(state,value){
      state.history=value;
      console.log(value)
    },
    searchHistory(state,value){
      state.searchHistory.push(value)
    }
  },
  actions: {
  },
  modules: {
  }
})
